/**    
* @Title: MarketUtils.java
* @Package: org.vdalf.gsgz.utils
* @author vDalf 2020-09-26 18:12:02 下午6:12:02
* @Copyright © 2020 vDalf Block-Chain Foundation (In Preparation Non-Governmental Organization) All rights reserved.
*/
package org.vdalf.gsgz.utils;

import java.util.regex.Pattern;

/**    
* @Title: MarketUtils.java
* @Package: org.vdalf.gsgz.utils
* @Description: 
* @author vDalf 2020-09-26 18:12:02 下午6:12:02
*/
public class MarketUtils {

	private static final Pattern futurePattern = Pattern.compile(".*-[0-9]{6}");
	
	private static final Pattern swapPattern = Pattern.compile(".*-SWAP");
	
	public static boolean isFuture(String market) {
		return futurePattern.matcher(market).matches();
	}
	
	public static boolean isSwap(String market) {
		return swapPattern.matcher(market).matches();
	}
	
	public static void main(String[] args) {
		System.err.println(isFuture("BCH-USD-210326"));
		System.err.println(isSwap("BTC-USDT-SWAP"));
	}
	
}
